﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClientManager.Data.Infrastucture
{
    public interface IUnitOfWork
    {
        /// <summary>
        /// Commits all changes
        /// </summary>
        void Commit();
        /// <summary>
        /// Returns dbContext
        /// </summary>
        DbContext DbContext { get; }
        /// <summary>
        /// Returns a repository
        /// </summary>
        /// <typeparam name="T">EntidadBase</typeparam>
        /// <returns></returns>
        IRepository<T> GetRepository<T>() where T : class;
        
    }
}
